package zhuyun.code.photoviews

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import kotlinx.android.synthetic.main.activity_recycler_view.*
import zhuyun.code.photoviews.adapter.RecyclerViewAdapter
import zhuyun.code.photoviews.component.LooperHorizontalLayoutManager

class RecyclerViewActivity : AppCompatActivity() {

    private lateinit var recyclerViewAdapter: RecyclerViewAdapter

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_recycler_view)
        recyclerViewAdapter =
            RecyclerViewAdapter(this)
        val layoutManager = LooperHorizontalLayoutManager()
        layoutManager.setCanLooperScroll(true)
        photoRecyclerView.layoutManager = layoutManager
        photoRecyclerView.adapter = recyclerViewAdapter

    }
}
